﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using Microsoft.Xna.Framework;
using Microsoft.Xna.Framework.Content;
using Microsoft.Xna.Framework.Graphics;

namespace NAVE_Alice_demo.Cena08.Cena.Objeto
{
    class Sapo : Objeto
    {
        #region Construtor
        /// <summary>
        /// Construtor
        /// </summary>
        /// <param name="Content">Carregar recursos do content</param>
        public Sapo(ContentManager Content)
        {
            this.t2d_imagem = Content.Load<Texture2D>("Cena08//Cena//Camada2//sapo");
            this.totalFrames = 5;
            for (int indice = 0; indice < totalFrames; indice++)
            {
                if (indice == 0)
                    this.rec_frame.Add(new Rectangle(0, 0, t2d_imagem.Width / totalFrames, t2d_imagem.Height));
                else
                    this.rec_frame.Add(new Rectangle(rec_frame[indice - 1].X + rec_frame[indice - 1].Width, 0,
                                                     t2d_imagem.Width / totalFrames, t2d_imagem.Height));
            }

            this.v2d_posicao = new Vector2(585, 390);
            this.v2d_tamanho = new Vector2(t2d_imagem.Width / totalFrames, t2d_imagem.Height);

            this.int_tempoAtual = 0;
            this.int_tempoProximoFrame = 130;
            this.frameAtual = 0;
        }

        #endregion
    }
}
